<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let s = 'sex';

        let obj = {
            name:"老王",
            age:18,
            [s]:"男"
        }

        let obj3 = {
            like:"篮球"
        }

        // console.log(obj.name);
        // console.log(obj['age']);

        // obj.name = '小李';
        // obj['age'] = 22;

        // console.log(obj);

        let obj2 = {...obj,...obj3};

        console.log(obj2);
        console.log(obj2===obj);

    </script>
</body>
</html>